package com.tang.transmission.config;





import com.tang.transmission.interceptor.GatewayFromInterceptor;
import com.tang.transmission.interceptor.JwtInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class JwtWebMvcConfig implements WebMvcConfigurer {

    @Autowired
    private JwtInterceptor jwtInterceptor;
    @Autowired
    private GatewayFromInterceptor gatewayFromInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        // 将其注册到拦截器中
//        registry.addInterceptor(gatewayFromInterceptor).addPathPatterns("/**");
    }
}


